home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol A-4
/
(Vol A-4) Vol. A4.iso
/
Games
/
Word-Safari.swf
/
scripts
/
frame_12
/
PlaceObject2_227_194
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2008-02-25
|
836b
|
45 lines
onClipEvent(enterFrame){
this._x += this.dx;
this._y += this.dy;
this.dy += this.gravity;
this.dx *= this.damping;
this.dy *= this.damping;
this._rotation = this.dx * 5;
if(Key.isDown(37) and _root.death == false)
{
this.dx -= 0.7;
}
if(Key.isDown(39) and _root.death == false)
{
this.dx += 0.7;
}
if(Key.isDown(38) and _root.death == false)
{
this.dy -= 1.5;
}
if(Key.isDown(40) and _root.death == false)
{
this.dy += 1.5;
}
if(this._y > 300)
{
this._y = 300;
this.dy *= -1;
}
if(this._y < 0)
{
this._y = 0;
this.dy *= -1;
}
if(this._x > 570)
{
this._x = 570;
this.dx *= -1;
}
if(this._x < 30)
{
this._x = 30;
this.dx *= -1;
}
}